package tms.util.exception;

import tms.util.constants.UiMessage;

import javax.ejb.ApplicationException;

@ApplicationException(rollback = true)
public class ApplicationRuntimeException extends RuntimeException {
    private UiMessage uiMessage;

    public ApplicationRuntimeException() {
        super();
    }

    public ApplicationRuntimeException(String message) {
        super(message);
    }

    public ApplicationRuntimeException(String message, Throwable cause) {
        super(message, cause);
    }

    public ApplicationRuntimeException(Throwable cause) {
        super(cause);
    }

    public ApplicationRuntimeException(UiMessage message) {
        uiMessage = message;
    }


    public UiMessage getUiMessage() {
        return uiMessage;
    }
}
